package lab02.test14;

public class Rectangle extends Shape {
    //属性：长，宽
    double length;
    double width;
    Rectangle(double length,double width){
        this.length=length;
        this.width=width;
    }

    @Override
    //行为：getArea()方法计算对象的面积
    double getArea() {
        System.out.println("长方形的面积；");
        return  length*width;
    }
}
